﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Algorithm_api.util
{
    public class Util
    {
        /// <summary>
        /// 解析通过,号隔开的字符串并返回成int型数组
        /// </summary>
        /// <param name="array"></param>
        /// <returns></returns>
        public static int[] StringToArray(string array)
        {
            return array.Split(',').Select((a) => int.Parse(a)).ToArray();
        }
    }
}
